package com.cyt.${moduleName?replace('/', '.')}.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cyt.base.domain.po.BasePo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;


<#list table.columns as column>
<#if column.javaType == "BigDecimal" && column.columnName != "CreateTime" && column.columnName != "UpdateTime">
import java.math.BigDecimal;
<#break>
</#if>
</#list>
<#list table.columns as column>
<#if column.javaType == "Date" && column.columnName != "CreateTime" && column.columnName != "UpdateTime">
import java.util.Date;
<#break>
</#if>
</#list>

/**
 * ${description}-po类
 *
 * @author ${authorName}
 * @date ${.now}
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName("${table.sqlName}")
public class ${entityName} extends BasePo {
<#list table.columns as column>
<#if column.pk>
    @ApiModelProperty(name = "${column.columnNameLower}", value = "${column.columnAlias}", dataType = "String", position = ${column_index+1})
    private ${column.javaType} ${column.columnNameLower};
<#elseif column.columnName!="RemoveTag" && column.columnName!="Creator" && column.columnName!="CreateTime" && column.columnName!="Updater" && column.columnName!="UpdateTime">

    @TableField(value = "${column.sqlName}")
<#if column.javaType == "Integer">
    @ApiModelProperty(name = "${column.columnNameLower}", value = "${column.columnAlias}", dataType = "Integer", example = "0", position = ${column_index+1})
    private Integer ${column.columnNameLower};
<#elseif column.javaType == "Double">
    @ApiModelProperty(name = "${column.columnNameLower}", value = "${column.columnAlias}", dataType = "Double", position = ${column_index+1})
    private Double ${column.columnNameLower};
<#elseif column.javaType == "Float">
    @ApiModelProperty(name = "${column.columnNameLower}", value = "${column.columnAlias}", dataType = "Float", position = ${column_index+1})
    private Float ${column.columnNameLower};
<#elseif column.javaType == "BigDecimal">
    @ApiModelProperty(name = "${column.columnNameLower}", value = "${column.columnAlias}", dataType = "BigDecimal", example = "0", position = ${column_index+1})
    private BigDecimal ${column.columnNameLower};
<#elseif column.javaType == "Date">
    @ApiModelProperty(name = "${column.columnNameLower}", value = "${column.columnAlias}", dataType = "Date", position = ${column_index+1})
    private Date ${column.columnNameLower};
<#else>
    @ApiModelProperty(name = "${column.columnNameLower}", value = "${column.columnAlias}", dataType = "String", position = ${column_index+1})
    private String ${column.columnNameLower};
</#if>
</#if>
</#list>

    public ${entityName}() {
        super();
    }

    public ${entityName}(String userId) {
        super(userId);
    }
}
